﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CommonTypes
{
      public delegate void DOnLogging(LogEventArgs e);
      public delegate void DOnJobFinished(JobFinishedEventArgs e);

    public struct TargetItem
    {
        public string url;
        public Encoding encoding;
        public string regex;
        public System.Text.RegularExpressions.MatchCollection matcheditems;
        public bool status;
        public string body;
    }

    public class LogEventArgs : System.EventArgs
    {
        private string _logtype;
        private string _log;

        public LogEventArgs(string logtype, string log)
        {
            _logtype = logtype;
            _log = log;
        }

 
        public string LogType {
            get {
                return _logtype;
            }
        }

        public string Log {
            get {
                return _log;
            }
        }
    }

    public class JobFinishedEventArgs : System.EventArgs
    {
        private TargetItem _targetitem;

        public JobFinishedEventArgs(TargetItem targetitem)
        {
            _targetitem = targetitem;
        }

        public TargetItem TargetNode
        {
            get
            {
                return _targetitem;
            }
        }
    }
}
